Image compression and decompression based on an integer wavelet transform using a lifting scheme and a correction method

ABSTRACT

A wavelet-based image compression system and method are presented. Compression is accomplished by performing a wavelet transformation of an input digital image. The resulting wavelet coefficients are compared to a threshold value. Coefficients falling below the threshold are discarded. The remaining coefficients are quantized. The quantized coefficients are then compressed using an entropy encoding technique, such as arithmetic, run length, or Huffman encoding, or a combination of Huffman and run length encoding. The wavelet transform can be an integer wavelet transform derived using a lifting scheme or correction method, while the quantization scheme can be sub-band oriented. Input color image pixels can be reduced using a color table. In addition, color pixels can be transformed between color spaces prior to wavelet transformation.

This application claims the benefit of U.S. Provisional Application No.60/040,241, filed Mar. 11, 1997, System and Method for Still ImageCompression, which is incorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates generally to digital imagecompression/decompression, and particularly, to a wavelet-based systemand method of image compression and decompression.

BACKGROUND OF THE INVENTION

Nearly every computer user needs to store, transfer, and view images.These images include still images, or pictures, as well as video images,which are sequences of still images displayed in a manner that depictsmotion. The enormous size of image files leads to serious filemanagement limitations. For example, a single still image (equivalent toa video frame) displayed by a rectangular array of picture elements(pixels) arranged in 640 rows and 800 columns, with the color of eachpixel represented by twenty-four bits, would require over 1.5 megabytesof digital memory to store. One solution to this problem is high-qualitydata compression technology. Essentially, image compressionmathematically transforms a grid of image pixels into a new, muchsmaller set of digital values holding the information needed toregenerate the original image or data file.

In addition to imaging systems, compression technology can beincorporated into “video on demand” systems, such as video servers.Compression technology can also be applied to streaming video, which isthe real-time capture and display of video images over a communicationslink. Applications for streaming video include video telephones, remotesecurity systems, and other types of monitoring systems.

Several standards for compressing real-time video currently exist. TheH.263 standard for real-time video is an industry standard based uponthe discrete co-sign transform (DCT). DCT is also the basis for both ofthe public domain image compression standards, MPEG (Motion PictureExperts Group) and JPEG (Joint Photographic Experts Group). Although theDCT approach performs interframe coding adequately, its compressionratio and speed can be improved upon.

Various other types of data compression have been developed in recentyears. Conventional data compression techniques are generally referredto as being either “lossless” or “lossy”, depending upon whether data isdiscarded in the compression process. Examples of conventional losslesscompression techniques include Huffman encoding, arithmetic encoding,and Fano-Shannon encoding. With a lossless compression, thedecompression process will reproduce all bits of the original image.Lossless compression is important for images found in such applicationsas medical and space science. In such situations, the designer of thecompression algorithm must be very careful to avoid discarding anyinformation that may be required or even useful at some later point.

Lossy compression, in contrast, provides greater efficiency overlossless compression in terms of speed and storage, as some data isdiscarded. As a result, lossy techniques are employed where some degreeof inaccuracy relative to the input data is tolerable. Accordingly,lossy compression is frequently used in video or commercial imageprocessing. Two popular lossy image compression standards are the MPEGand JPEG compression methods.

The wavelet transform has proven to be one of the most powerful tools inthe field of data compression. Theoretically, the wavelet transformationis lossless, but since all computers have only finite precision evenwhen using floating point calculations, most of the transformations arelossy in practice. On the other hand, integer calculations are muchfaster than floating point for virtually all computers; and integercomputations are much easier to implement in hardware, which is moreimportant in some applications. While integers require less memory thanreal numbers, the direct use of integers in conventional wavelettransforms and their inverses typically causes an unacceptable loss ofaccuracy. Accordingly, there is a need for a wavelet-based compressiontechnique that permits lossless or near-lossless data compression, yetretains the speed and memory advantages of integer arithmetic.

SUMMARY OF THE INVENTION

It is an advantage of the present invention to provide a system andmethod of wavelet-based data compression that permits integercomputations in a computer without significant loss of accuracy. This isaccomplished by using an integer reversible wavelet transform thatpossesses a property of precision preservation (PPP). The integerreversible transform greatly reduces the computer resources needed tocompress and decompress images, as well as the time required to performthe same.

It is an advantage of the present invention to provide a system andmethod of wavelet-based image compression that is suitable for bothstill and video images.

It is also an advantage of the present invention to provide a system andmethod of image compression that is capable of selectively performinglossless and lossy compression of either color or gray-scale images.

According to one aspect of the invention, a wavelet-based imagecompression method can be implemented using a software program.Compression is accomplished by performing a wavelet transform on aninput digital image. The resulting wavelet components are compared to athreshold value; coefficients falling below the threshold are discarded.The remaining coefficients are quantized. The quantized coefficients arethen compressed using an entropy encoding technique, such as arithmetic,run length, or Huffman encoding, or a combination of Huffman and runlength encoding. The wavelet transform can be an integer reversiblewavelet transform derived using a lifting scheme or correction method,while the quantization scheme can be sub-band oriented. To furtherenhance the speed of the compression scheme, input color image pixelscan be reduced using a color table. In addition, color pixels can betransformed between color spaces prior to wavelet transformation.

According to another aspect of the invention, a corresponding method ofdecompression is provided.

According to another aspect of the present invention, a compressionmethod is provided that allows user selected portions of an image to becompressed to different image qualities, thereby permitting non-uniformimage compression.

According to another aspect of the present invention, a compressionmethod is provided that permits compression quality to be based on imagespecific parameters.

According to another aspect of the present invention, a method ofcompressing images using a “split and merge” technique is provided.

According to further aspect of the present invention, an imagecompression system includes a compressor configured to generate acompressed image based on an integer wavelet transform derived usingeither a lifting scheme or correction method. The compressor can beimplemented using one or more electronic components, such as applicationspecific integrated circuits (ASICs), microprocessors, discrete logiccomponents, or any combination of the aforementioned.

According to another aspect of the present invention, a correspondingimage decompression system is provided.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention is pointed out with particularity in the appended claims.However, other features of the invention will become more apparent, andthe invention will be best understood by referring to the followingdetailed description in conjunction with the accompanying drawings, inwhich:

FIG. 1 illustrates a flow diagram for a method of compressing an imagethat is in accordance with an embodiment of the present invention;

FIGS. 2–4 depict wavelet coefficients for various levels ofdecomposition;

FIG. 5 illustrates a flow diagram of a method of decompressing an imagethat has been compressed using the method of FIG. 1;

FIG. 6 is a block diagram of a system that can incorporate a softwareprogram implementing any of the methods shown in FIGS. 1, 5, and 8–13 inaccordance with a second embodiment of the present invention;

FIG. 7 is a block diagram of a system for compressing and decompressingan image in accordance with another embodiment of the present invention;

FIG. 8 illustrates a flow diagram of a method compressing an image thatis in accordance with a further embodiment of the present invention;

FIG. 9 illustrates a flow diagram of a method for decompressing an imagethat has been compressed according to the method of FIG. 8;

FIG. 10 illustrates a flow diagram of a method of compressing an imagein accordance with a further embodiment of the present invention;

FIG. 11 illustrates a flow diagram of a method of decompressing an imagethat has been compressed according to the method of FIG. 10;

FIG. 12 illustrates a flow diagram of a method of compressing an imagethat is in accordance with a further embodiment of the presentinvention; and

FIG. 13 illustrates a flow diagram of a method for decompressing animage that has been compressed according to the method of FIG. 12.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring now to the drawings, and in particular to FIG. 1, there isshown a flow diagram of a method for compressing an image that conformsto a first embodiment of the invention. In step 20, a digital image isreceived from an image source. The digital image consists of a matrix ofvalues representing an array of pixels. Specifically, the array ofpixels represents a still image or a frame from a video image. In step22, the image is optionally displayed on an appropriate viewing device,such as a computer or video display unit having a flat panel or cathoderay tube (CRT). Next, in step 24, color and wavelet transformations ofthe image take place. The image transformations involved in this stepinclude color transform for color images only, and wavelet transform forboth gray level images and color images. In step 26, the valuesrepresenting the transformed images are quantized and compared tothresholds. Values falling outside the threshold are discarded. In step28, the remaining quantized values are encoded to remove redundantinformation, creating a compressed image file. Next, in step 30 thecompressed image file is generated as output.

Referring to the color transformation of step 24, digital color imagesare typically based on an RGB color model, such as is commonly used withTIFF or BMP images. In order to get a higher compression ratio, the RGBpixels are transformed to other color models, such as YIQ or YUV models.The method can convert RGB inputs into YIQ or YUV color spaces accordingto the following relationships.RGB to YIQ: $\begin{bmatrix}Y \\I \\Q\end{bmatrix}{{\begin{matrix} = \\ = \\ = \end{matrix}\left\lbrack \begin{matrix}0.299 & 0.587 & 0.114 \\{- 0.596} & {- 0.275} & 0.321 \\0.212 & {- 0.523} & 0.311\end{matrix} \right\rbrack}\left\lbrack \begin{matrix}R \\G \\B\end{matrix} \right\rbrack}$RBG to YUV: $\begin{bmatrix}Y \\U \\V\end{bmatrix}{{\begin{matrix} = \\ = \\ = \end{matrix}\left\lbrack \begin{matrix}0.299 & 0.587 & 0.114 \\0.148 & {- 0.289} & 0.439 \\0.615 & {- 0.515} & {- 0.1}\end{matrix} \right\rbrack}\left\lbrack \begin{matrix}R \\G \\B\end{matrix} \right\rbrack}$

In the YIQ color space, there is one luminescence (Y) and two colorplanes (I, Q). The Y component is critical, while the I-Q components areless sensitive to error introduced by data compression.

The wavelet transform (also referred to as wavelet decomposition)operates on the converted color space signals. The purpose of thewavelet transform is to represent the original image by a differentbasis to achieve the objective of decorrelation. There are manydifferent wavelet transforms that can be used in this step. Forinstance, the reversible integer wavelet transform described hereinbelow is a preferred wavelet transform. However, to develop a betterunderstanding of the preferred transform, the following alternativewavelet transform is first described.Let C ⁰ =[C _(jk) ⁰] (j−0, . . . , M−1; k=0, . . . ,N−1) represent the original, uncompressed image, where M and N areintegers which have the common factor 2^(L) (L is a positive integer). Aone-level wavelet decomposition, where L=1, results in the fourcoefficient quadrants as shown in FIG. 2. Each quadrant represents a setof wavelet coefficients.

Quadrant C¹ represents the blurred image of the original image C⁰, where$C^{1} = {\left\lbrack C_{jk}^{1} \right\rbrack{\left( {{j = 0},\ldots\mspace{11mu},{{\frac{M}{2} - 1};{k = 0}},\ldots\mspace{11mu},{\frac{N}{2} - 1}} \right).}}$HD¹ represents the horizontal high frequency part of C⁰, while VD¹represents the vertical high frequency part of C⁰, and DD¹ representsthe diagonal high frequency part of C⁰. The decomposition can beiteratively repeated L times to obtain different levels ofdecomposition. For example, for L=2, C⁰ is set to equal C¹. Theiterative formula for computing a decomposition is given as follows:

-   (1) Let {overscore (C)}⁰=rC⁰, r>0 is a factor which can be changed    for different needs.-   (2) Transform for image columns:    -   For k=0, . . . , N−1, calculate $\begin{matrix}        \left\{ \begin{matrix}        {{{\overset{\sim}{d}}_{0k}^{1} = \frac{{\overset{\_}{C}}_{1k}^{0} - {\overset{\_}{C}}_{0K}^{0}}{2}},} \\        {{{\overset{\sim}{d}}_{jk}^{1} = {\frac{1}{4}\left( {{\overset{\_}{C}}_{{{2j} - 1},k}^{- 0} - {2{\overset{\_}{C}}_{{2j},k}^{- 0}} + {\overset{\_}{C}}_{{{2j} + 1},k}} \right)}},{j = 1},\ldots\mspace{11mu},{\frac{M}{2} - 1.}}        \end{matrix} \right. & \left( {3.1{.1}} \right)        \end{matrix}$    -   For k=0 . . . , N−1, calculate $\begin{matrix}        \left\{ \begin{matrix}        {{{\overset{\sim}{C}}_{0k}^{1} = {{\overset{\_}{C}}_{1,k}^{0} - \frac{{\overset{\sim}{d}}_{ok} + {\overset{\sim}{d}}_{1,k}}{2}}},} \\        {{{\overset{\sim}{C}}_{jk}^{1} = {{\overset{\_}{C}}_{{{2j} + 1},k} - \frac{{\overset{\sim}{d}}_{jk}^{1} + {\overset{\sim}{d}}_{{j + 1},k}}{2}}},{j = 1},\ldots\mspace{11mu},\frac{M}{2},} \\        {\frac{{\overset{\sim}{C}}_{N - 2}^{- 1}}{2},{k = {{\overset{\sim}{C}}_{{N - 1},k}^{- 0} - \frac{{\overset{\sim}{d}}_{N - 2}}{2}}},{k.}}        \end{matrix} \right. & \left( {3.1{.2}} \right)        \end{matrix}$-   (3) Transform for rows:    -   For j=0, . . . M/2−1, computing $\begin{matrix}        \left\{ \begin{matrix}        {{{hd}_{j,0}^{1} = \frac{{\overset{\sim}{c}}_{j1} - {\overset{\sim}{c}}_{j0}^{1}}{2}},} \\        {{{hd}_{jk}^{1} = {\frac{1}{4}\left( {{{\overset{\sim}{c}}_{j,{{2k} - 1}}^{1} - {2{\overset{\sim}{c}}_{j,{{2k} + 1}}}},{+ {\overset{\sim}{c}}_{j,{{2k} + 1}}}} \right)}},{k = {{1\mspace{11mu}\ldots\mspace{11mu}\frac{N}{2}} - 1.}}}        \end{matrix} \right. & \left( {3.1{.3}} \right)        \end{matrix}$        and $\begin{matrix}        \left\{ \begin{matrix}        {{c_{j0}^{1} = {{\overset{\sim}{c}}_{j,1}^{1} - \frac{{hd}_{j0}^{1} + {hd}_{j1}^{1}}{2}}},} \\        {{c_{jk}^{1} = {c_{j,{{2k} + 1}}^{1} - \frac{{hd}_{j,k}^{1} + {hd}_{j,{k + {1\prime}}}^{1}}{2}}},\ldots\mspace{11mu},{\frac{M}{2} - 2},} \\        {{c_{j,\frac{N - 2}{2}} = {{\overset{\sim}{c}}_{j,{N - 1}}^{1}{hd}_{j,\frac{N - 2}{2}}}},}        \end{matrix} \right. & \left( {3.1{.4}} \right)        \end{matrix}$        For j=0, . . . , M/2−1, computing $\begin{matrix}        \left\{ \begin{matrix}        {{{dd}_{j,0}^{1} = \frac{{\overset{\sim}{d}}_{j,1}^{1} - {\overset{\sim}{d}}_{j0}^{1}}{2}},} \\        {{{dd}_{jk}^{1} = {\frac{1}{4}\left( {{\overset{\sim}{d}}_{j,{{2k} - 1}}^{1} - {2{\overset{\sim}{d}}_{j,{2k}}} + {\overset{\sim}{d}}_{j,{{2k} + 1}}^{1}} \right)}},{k = {{1\ldots\frac{N}{2}} - 1.}}}        \end{matrix} \right. & \left( {3.1{.5}} \right)        \end{matrix}$        and $\begin{matrix}        \left\{ \begin{matrix}        {{{vd}_{j0}^{1} = {{\overset{\sim}{d}}_{j,1}^{1} - \frac{{dd}_{j0}^{1} + {dd}_{j1}^{`1}}{2}}},} \\        {{{vd}_{jk}^{1} = {{\overset{\sim}{d}}_{j,{{2k} + 1}}^{1} - \frac{{dd}_{j,k}^{1} - {dd}_{j,{k + 1}}^{1}}{2}}},{k = 1},\ldots\mspace{11mu},{\frac{M}{2} - 2},} \\        {{{vd}_{j,\frac{N - 2}{2}} = {{\overset{\sim}{d}}_{{N - 1},k} - {dd}_{\frac{j,{N - 2}}{2}}^{1}}},}        \end{matrix} \right. & \left( {3.1{.6}} \right)        \end{matrix}$-   (4) C¹=[c_(j,k) ¹], HD¹=[hd_(j,k) ¹], VD¹[vd_(j,k) ¹] and    DD=[dd_(j,k) ¹], j=0, . . . ,    ${{\frac{M}{2} - {1\mspace{14mu} k}} = 0},\ldots\mspace{14mu},{\frac{M}{2} - 1.}$    Remark: If it is necessary, we also can use matrix multiply Wavelet    Coefficient Image of 1 levels=W₁C^(o)W₁ ^(T). Here, W¹ is the    transform matrix for 1 level wavelet decomposition.

FIG. 3 depicts a three-level wavelet decomposition, where L=3.

In step 26, the first loss in accuracy occurs. Both thresholding andquantization reduce accuracy with which the wavelet coefficients arerepresented. In step 26, the wavelet coefficients are matched againstthreshold values, and if the values are less than the establishedthreshold values specified, then the resultant value is set to zero.

An important feature of the invention is that the wavelet coefficientsare then quantized to a number of levels depending upon which quadrantis being processed, and the desired compression or quality factor. Thiscan be very important in image compression, as it tends to make manycoefficients zeros, especially those for high spatial frequencies, whichreduces the size of a compressed image.

A multilevel uniform thresholding method can be used as described below.

Let T=(t₁, . . . , t_(L), t_(L+1)) be the chosen thresholds, where t_(t)is the threshold for l the (l=I, L) level and t_(L+1) is a threshold forblurred image C^(L). Thresholding sets every entry in the blocks C^(L),HD¹, VD¹ and DD¹ (l=I, . . . L) to be zero if its absolute value is notgreater than the corresponding threshold.

For color images, three threshold vectors which correspond threedifferent color planes, such as y, I and Q, are used.

The step of quantization essentially scales the wavelet coefficients andtruncates them to a predetermined set of integer values. Thequantization table shown in Table 1 can be used.

TABLE 1 q¹ _(HD) q² _(HD) . . . q^(L) _(HD) q¹ _(VD) q² _(VD) . . .q^(L) _(VD) q_(C) ^(L+1) q¹ _(DD) q² _(DD) . . . q^(L) _(DD)

In Table 1, the entries q¹ _(HD) are quantization factors for blocks HD¹(l=I, . . . L), q¹ _(VD) and q¹ _(DD) for blocks VD¹ and DD¹ (l=I, . . ., L) respectively, and the factor q_(c) ^(L+1) is for the most blurredimage C^(L). The factors can be integers between 0 and 255. Thequantization scheme for the block HD¹ (l=I, . . . , L) is$\begin{matrix}{{{\overset{\_}{hd}}_{j,k}^{1} = {{round}\frac{{hd}_{j,k}^{l} \cdot q_{HD}^{l}}{\max_{HD}^{l}}}},{j = 0},\ldots\mspace{11mu},{{\frac{M}{2^{l}} - 1};{k = 0}},\ldots\mspace{11mu},{\frac{N}{2^{l}} - 1.}} & \left( {3.2{.1}} \right)\end{matrix}$

Here,${\overset{\_}{hd}}_{j,k}^{l}\left( {{j = 0},\ldots\mspace{11mu},{{\frac{M}{2^{l}} - 1};},{k = 0},\ldots\mspace{11mu},{\frac{N}{2^{l}} - 1}} \right)$are quantized wavelet coefficients of block HD¹(l=1, . . . , L)max_(HD) ¹=max (|hd _(j,k) ¹|),0≦j≦(M/2¹/2¹−1)0≦j≦(N/2¹/2¹−1)and the function round(x) gives the nearest integer of x. Equation(3.2.1) is used for quantization of the other blocks (quadrants).

For color images, there are three separate quantization tables for thedifferent color bands.

In step 28, entropy compression is applied to the resultant coefficientsusing either Arithmetic, Run Length, or Huffman, or Huffman and RunLength combined. The compression algorithm can be selected at run-timeby the user, based on the desired compression ratio and the amount oftime required to get the selected level of compression. The encodingstep includes the entropy compression as well as coefficientrearranging.

An alternative process to that shown in FIG. 1 includes an optional downsampling of the IQ color planes. This down sampling may be done once ortwice to produce two image planes either one-fourth or one-sixteenth thesize of the original plane. If the down sampling is done, it will beaccomplished prior to the wavelet transform of step 24. The downsampling reduces the compression time and size of the image file.

FIG. 5 shows a corresponding method for decompressing an imagecompressed using the method of FIG. 1. In step 40, the compressed imagefile is input. In step 42, the image is decoded. Next, in step 44 thevalues are de-quantized. Next, in step 46 inverse color and wavelettransformations are performed on the de-quantized data. In step 48,optional image post-processing takes place to refine the decompressedimage. In step 50, the decompressed image is displayed.

The decoding of step 42 is the inverse operation of the encoding of step28. Similarly, it can be divided into two parts: Entropy decoding(Huffman or arithmetic), and coefficient rearranging.

The decoding step produces quantized wavelet coefficients in 3*L+1blocks. Dequantizing (step 44) uses the same quantization table asquantizing (Table 1), and the scheme as follows: for l=I, . . . , L$\begin{matrix}{{{\underset{\_}{hd}}_{j,k}^{l} = \frac{{\overset{\_}{hd}}_{j,k}^{l} \cdot \max_{HD}^{l}}{q_{HD}}},{j = 0},\ldots\mspace{11mu},{{\frac{M}{2^{l}} - 1};{k = 0}},\ldots\mspace{11mu},{\frac{N}{2^{l}} - 1.}} & \left( {4.2{.1}} \right)\end{matrix}$Equation (4.2.1) produces the approximate coefficients for the blocksHD¹ (l=I, . . . , L), which are shown in FIG. 3. The dequantizing schemefor other blocks is similar to 4.1.2).

In step 46, the inverse wavelet transform, also referred to as waveletreconstruction, is performed prior to the inverse color transformation.FIG. 4 depicts a one-level wavelet reconstruction.

The wavelet reconstruction can be iteratively performed for variouslevels of decomposition, according to the following equations.

-   (1) Inverse transform for rows:

For ${j = 0},\ldots\mspace{11mu},{\frac{M}{2} - 1},$calculate $\begin{matrix}\left\{ \begin{matrix}{{\overset{\sim}{d}}_{j,1}^{1} = {{\upsilon\; d_{j,0}^{1}} + \frac{{dd}_{j,0}^{1} + {dd}_{j,1}^{1}}{2}}} \\{{{\overset{\sim}{d}}_{j,{{2k} + 1}}^{1} = {{\upsilon\; d_{jk}^{1}} + \frac{{dd}_{j,k}^{1} - {dd}_{j,{k + 1}}^{1}}{2}}},{k = 1},\ldots\mspace{14mu},{\frac{N}{2} - 2},} \\{{\overset{\sim}{d}}_{{N - 1},k} = {{\upsilon\; d_{j,\frac{N - 1}{2}}} + {{dd}_{j,\frac{N - 2}{2}}^{1}.}}}\end{matrix} \right. & \left( {4.3{.1}} \right)\end{matrix}$and $\begin{matrix}\left\{ \begin{matrix}{{{\overset{\sim}{d}}_{j,0}^{1} = {d_{j,1}^{1} - {2{dd}_{j,0}^{1}}}},} \\{{{\overset{\sim}{d}}_{j,{2k}}^{1} = {\frac{{\overset{\sim}{d}}_{j,{{2k} - 1}}^{1} + {\overset{\sim}{d}}_{j,{{2k} + 1}}^{1}}{2} - {2{dd}_{j,k}^{1}}}},{k = 1},\ldots\mspace{14mu},{\frac{N}{2} - 1.}}\end{matrix} \right. & \left( {4.3{.2}} \right)\end{matrix}$

For j=0, . . . , M/2−1, calculate $\begin{matrix}\left\{ \begin{matrix}{{\overset{\sim}{c}}_{j,1}^{1} = {c_{j0}^{1} + \frac{{hd}_{j0}^{1} + {hd}_{j1}^{1}}{2}}} \\{{{\overset{\sim}{c}}_{j,{{2k} + 1}}^{1} = {c_{jk}^{1} + \frac{{hd}_{j,k}^{1} - {hd}_{j,{k + 1}}^{1}}{2}}},{k = 1},\ldots\mspace{14mu},{\frac{N}{2} - 2},} \\{{\overset{\sim}{c}}_{j,{N - 1}} = {c_{j,\frac{N - 2}{2}} + {{hd}_{j,\frac{N - 2}{2}}^{1}.}}}\end{matrix} \right. & \left( {4.3{.3}} \right)\end{matrix}$and $\begin{matrix}\left\{ \begin{matrix}{{{\overset{\sim}{c}}_{j,0}^{1} = {c_{j,1}^{1} - {2{hd}_{j,0}^{1}}}},} \\{{{\overset{\sim}{c}}_{j,{2k}}^{1} = {{\frac{1}{2}\left( {{\overset{\sim}{c}}_{j,{{2k} - 1}}^{1} + {\overset{\sim}{c}}_{j,{{2k} + 1}}^{1}} \right)} - {2{hd}_{jk}^{1}}}},{k = {1\mspace{14mu}\ldots}}\mspace{14mu},{\frac{N}{2} - 1.}}\end{matrix} \right. & \left( {4.3{.4}} \right)\end{matrix}$

-   (2) Inverse transform for column:

For k=0, . . . , N−1, calculateand $\begin{matrix}\left\{ \begin{matrix}{{{\overset{\_}{c}}_{1,k}^{0} = {{\overset{\sim}{c}}_{0k}^{1} + \frac{{\overset{\sim}{d}}_{0k}^{1} + {\overset{\sim}{d}}_{1,k}^{1}}{2}}},} \\{{{\overset{\_}{c}}_{{{2j} + 1},k}^{0} = {{\overset{\sim}{c}}_{jk}^{1} + \frac{{\overset{\sim}{d}}_{j,k}^{1} + {\overset{\sim}{d}}_{{j + 1},k}^{1}}{2}}},{j = 1},\ldots\mspace{14mu},{\frac{M}{2} - 2},} \\{{\overset{\_}{c}}_{{N - 1},k}^{0} = {{\overset{\sim}{c}}_{\frac{N - 2}{2},k}^{1} + {{\overset{\sim}{d}}_{\frac{N - 2}{2},k}^{1}.}}}\end{matrix} \right. & \left( {4.3{.5}} \right)\end{matrix}$ $\begin{matrix}\left\{ \begin{matrix}{{{\overset{\_}{c}}_{0k}^{0} = {c_{1k}^{0} - {2{\overset{\sim}{d}}_{0k}^{1}}}},} \\{{{\overset{\_}{c}}_{{2j},k}^{0} = {{\frac{1}{2}\left( {{{\overset{\_}{c}}_{{{2j} - 1},k}^{0} + {\overset{\_}{c}}_{{2j} + {1k}}^{0}},} \right)} - {2{\overset{\sim}{d}}_{jk}^{1}}}},{j = 1},\ldots\mspace{14mu},{\frac{M}{2} - 1.}}\end{matrix} \right. & \left( {4.3{.6}} \right)\end{matrix}$ $\begin{matrix}{{{c_{j,k}^{0} = {{\overset{\sim}{c}}_{j,k}^{0}/r}},{j = 0},\ldots\mspace{14mu},{{M - 1};{k = 0}},\ldots\mspace{14mu},{N - 1.}}\mspace{14mu}{C^{0} = {\left\lbrack c_{j,k}^{0} \right\rbrack\frac{N}{1} \times {\frac{N}{2}.}}}} & (3)\end{matrix}$Following the inverse wavelet transformation, an inverse color transformis performed. Equations (5)–(6) give the inverse transforms for the YIQand YUV color spaces.

For YIQ to RGB: $\begin{matrix}{\begin{bmatrix}R \\G \\B\end{bmatrix} = {\begin{bmatrix}1.000 & 0.956 & 0.621 \\1.000 & {- 0.272} & {- 0.647} \\1.000 & {- 1.106} & 1.703\end{bmatrix}\begin{bmatrix}Y \\I \\Q\end{bmatrix}}} & (5)\end{matrix}$

For YUV to RGB: $\begin{matrix}{\begin{bmatrix}R \\G \\B\end{bmatrix} = {\begin{bmatrix}1.000 & 0.000 & 1.140 \\1.000 & {- 0.395} & {- 0.581} \\1.000 & 2.032 & 0.000\end{bmatrix}\begin{bmatrix}Y \\U \\V\end{bmatrix}}} & (6)\end{matrix}$

In step 48, a user can optionally apply image filtering to improve theimage quality. Filters are known in the art for sharpening, smoothingand brightening images. Users can choose any number of processingfilters at compression time. Information defining the selected filterscan be stored in the coded image file, in a form such as a one byte flagin a file header. In addition to optionally applying the filters, themethod can also be implemented to automatically detect and apply theselected filters following decompression.

To sharpen an image, a filter is used that weights the eight pixelsadjacent to the current pixel, as well as the current pixel, by one ormore predetermined values. The weighted values of the nine pixels arethen summed to derive a new value for the current pixel. For example,the surrounding eight pixel values can be weighted by the value −35/800, while the current pixel is weighted by 1.35. The sharpeningfilter is applied to every pixel in the image.

To smooth images, for every pixel, the average of the pixel and theeight adjacent pixels is calculated. Then the pixel value and theaverage is compared. The smaller of the two replaces the original pixeland is output as the smoothed pixel value.

To brighten images, the weighted sum of each pixel and the correspondeight adjacent pixels is calculated. For example, each of the adjacentpixels can be multiplied by the value 1/90 and the summed with thecurrent pixel to obtain a brighten current pixel.

Another filter that can be used is one that adds a random value between[−12, 12] to each of the pixels in the image.

In FIG. 6 there is displayed a preferred hardware platform that canexecute software for implementing an embodiment of the presentinvention. The computer system of FIG. 3 includes a CPU 62, a mainmemory 64, an I/O subsystem 66, and a display 68, all coupled to a CPUbus 70. The I/O subsystem 66 communicates with peripheral devices thatinclude an image source 72, an image storage device 74, and a massstorage memory 76. Although shown as three separate devices, peripherals72–76 can be implemented using a single memory device, such as a harddisk drive commonly found in computers.

The image source 72 may be a digital still image or video source, suchas a CD-ROM drive, scanner, or network connection. In addition, theimage source 72 can include analog video sources, such as a videocamera, VCR, television broadcast or cable receiver. The analog videosignals would be converted to a digital form by the image source 72using conventional conversion techniques. Alternatively, an image source72 can include a video camera and communications systems fortransmitting real-time video to the I/O subsystem 66.

The image storage 74 can be a computer disk, such as a that used by ahard drive, or a portable memory medium, such as a floppy or ZIP disk,or a read/write optical CD.

In operation, a computer program, which implements aspects of theinvention, is retrieved from the mass storage memory 76 into the mainmemory 64 for execution by the CPU 62. Upon execution of the compressionaspect of the invention, the compressed image file can be stored in theimage storage 74; while upon execution of the decompression aspect ofthe invention, the decompressed image can be viewed on the display 68.Operating under the control of the computer program, the CPU 62 canprocess images according to the methods set forth herein, as shown inFIGS. 1–2 and 6–10.

FIG. 7 illustrates an alternative hardware platform implementing asystem in accordance with a further embodiment of the present invention.System 80 can be implemented using a variety of different hardwarecomponents, such as ASIC (Application Specific Integrated Circuits), ora combination of discrete digital components, such as microprocessors,standard logic components, and other programmable logic devices. Thesystem 80 includes a compression system 81 and a decompression system82. The compression system 81 can be configured to perform any one orcombination of the compression methods set forth in FIGS. 1, 8, 10, and12; while the decompression system can be configured to perform any oneor combination of the decompression methods set forth in FIGS. 5, 9, 11,and 13.

An image source 85 provides digital pixel values to a color converter84. The image source 85 can provide the same functionality as describedearlier for the image source 72 of FIG. 6.

The color converter 84 performs a color space transformation on theinput pixels, such as any of those described herein for FIG. 1. Theconverter functionality can be provided by conventional integratedcircuits that are readily available from various manufacturers.Compressor 86 compresses the transformed pixels, removing redundantdata. The compressed image file generated by the compressor 86 can betransferred directly to the decompression system 82 over a transmissionmedium 91. The transmission medium 91 can be a radio-link, computernetwork, cable television network, or satellite link. Alternatively, thecompressor 86 can transmit its output to a portable storage medium 92,such as an optical, floppy, or ZIP disk; or to a mass storage device 94such as a computer hard disk or archival system.

The decompressor 88 expands the compressed image file by applying aninverse wavelet transformation, as well as de-quantization andde-encoding functions. The decompressed data is then passed to aninverse color converter 90 that applies an inverse color spacetransformation to generate pixel values in a color space and formatappropriate for the image display 89. Standard electronic components arereadily available for performing the function of the inverse colorconverter 90.

FIG. 8 illustrates a flow diagram of a method of compressing an image inaccordance with an alternative embodiment of the present invention. Instep 100, a digital image is input. In step 102, a color spacetransformation is performed on the input image pixels. In step 104, thepixels are subjected to a wavelet transformation. In step 106, sub-bandquantization is performed on the wavelet coefficients. Next, in step 108the quantized sub-bands are respectively entropy encoded. In step 110,the coded image file is output.

Sub-band oriented quantization and entropy coding are well suited forwavelet-based image compression. The main idea is to take the advantageof different quantizations at different sub-bands (wavelet quadrant) andencode each band accordingly. Quadrants having a high variance inwavelet values can be allocated a finer mesh size for quantization,while those quadrants with smaller variances will be assigned fewerlevels of quantization. That is, the number of bits one wishes toallocate to the output could be varied by quadrant. Those quadrants withlarge variances will utilize more bits, while those with low variantswill utilize fewer bits. In this way, the number of bits resulting fromquantization will remain the same, but their allocation will differdepending upon the nature of the image. This technique greatly improvesimage quality while maintaining a high compression ratio.

FIG. 9 illustrates a flow diagram of a method of decompressing an imagecompressed according to the methods shown in FIG. 8. Step 120, thecompressed file is input. In step 122, the input image is entropydecoded. In step 124, de-quantization is performed on the decoded imagefile. Next, in step 126, an inverse wavelet transform is performed onthe image. In step 128, an inverse color transformation is performed. Instep 130, post-processing altering is optionally performed. In step 132,the decompressed image file is then displayed.

FIG. 10 illustrates a flow diagram of a method of compressing an imagein accordance with another embodiment of the present invention. Thismethod performs color-bit depth compression, which essentially reducesthe number of colors in the image to achieve compression. In step 140,the image is input with its original color. For example, each colorpixel could be represented by a standard 24-bit value. Next, in step142, a color table is created corresponding to the image. The colortable is a set of quantized color values. The quantized color valuesrepresent a smaller number of colors with correspondingly fewer bits.Each of the input pixels is mapped to the color table. In step 144, anindex is calculated for each pixel in the image by dithering the pixelvalues. Dithering is accomplished by weighting pixels adjacent to thecurrent pixel in a frame and then arithmetically combining the weightedvalues with the current pixel value to produce the index, which thenrepresents the current pixel. The dithering process is repeated for eachpixel in a frame. In step 146, the indexes are wavelet transformed. Instep 148, the wavelet coefficients are entropy coded. In step 150, thecoded image file is output.

FIG. 11 illustrates a flow diagram of a method of decompressing an imagethat has been compressed according to the method shown in FIG. 10. Instep 160, a compressed image file is received. Next, in step 162, theimage file is entropy decoded. In step 164, an inverse wavelet transformis applied to the decoded data. Next, in step 166, post-processingfiltering of the image is optionally applied. Next, in step 168, thedecompressed image is displayed.

FIG. 12 illustrates another method of compressing an image in accordancewith another embodiment of the present invention. In this method, a usercan selectively vary compression parameters (step 173) to obtain alossless or near-lossless compressed image at a desired compressionratio. In step 170, the image is input. In step 172, an integer colortransform is performed on the input image. In step 173, compressionparameters are selected by the user using a software interface. Theseparameters can include those described herein below in the subsectiontitle “Peak Signal to Noise Ratio (PSNR) Controlled Compression”. Instep 174, an integer wavelet transform is performed on the colortransformed pixels. In step 176, the wavelet coefficients are entropycoded. Next, in step 178, the compressed image file is then output fromthe system.

The integer color transformation of step 172 is an integer reversibletransform which can be used in color image compression to reduceprocessing time and image size. Step 172 transforms RGB color componentsto a set of color components Y-Nb-Nr, which are known.

The RGB to Y-Nb-Nr transform is given by the equations:Y=G+Int(R/2+B/2),Nb=B−Int(Y/2),Nr=R−Int(Y/2).

The integer wavelet transform of step 174 is described below in detail.

FIG. 13 illustrates a method of decompressing an image file that hasbeen compressed according to the method shown in FIG. 12. In step 180, acompressed image file is input. In step 182, the image is entropydecoded. Next, in step 184, an inverse integer wavelet transform isperformed on the decoded data. In step 186, an inverse integer colortransform is performed. Next, in step 188 optional post-processingfiltering is performed on the image. Next, in step 190, the decompressedimage is displayed.

The Y-Nb-Nr to RGB transform of step 186 is given by the equations:R=Nr+Int(Y/2),B=Nb+Int(Y/2),G=Y−Int (R/2+B/2)

The inverse integer wavelet transform of step 184 is described in detailbelow.

Reversible Integer Wavelet Transform

This method allows a series of transformations which are very close tothe corresponding biorthogonal wavelet transforms or some non-orthogonalwavelet transforms, but can be calculated with only integer addition andbit-shift operations. In addition, the integer wavelet transformscreated disclosed herein possess a property of precision preservation(PPP). This property is very useful for conserving memory in bothcompression and decompression, and speed up the whole procedure in someapplications. Two general methods from which one can get the integerwavelet transform desired are disclosed.

Basic Integer Wavelet Transformations

Two examples are provided as the starting point for the unique method.For the sake of convenience, length, and simplicity, presented is onlythe algorithm for a one level decomposition and reconstruction and onlyfor a one dimensional signal. The extension to two dimensions isimmediate as the rows and columns can be treated into a sequence of onedimensional signals. For the following examples, assume that {C_(n)⁰}_(n=0) ^(N−1) is the original signal where the superscript indicateslevel and the subscript indicates a particular point in the signal.Also, {C_(n) ¹}_(n=0) ^(N) ¹ ⁻¹ and {d_(n) ¹}_(n=0) ^(M) ¹ ⁻¹ are itsdecomposition parts at the first level. Here $\begin{matrix}{\begin{matrix}{N_{1} = \left\{ \begin{matrix}{\frac{N}{2},} & {{{if}\mspace{14mu} N{\mspace{11mu}\;}{is}\mspace{14mu}{an}\mspace{14mu}{even}\mspace{14mu}{number}},} \\{\frac{N + 1}{2},} & {{{if}\mspace{20mu} N{\mspace{11mu}\;}{is}\mspace{14mu}{an}\mspace{14mu}{odd}\mspace{14mu}{number}};}\end{matrix} \right.} \\{M_{1} = {N - N_{l}}}\end{matrix}{\left\{ c_{n}^{1} \right\}_{n = 0}^{N_{1} - 1}{and}\mspace{14mu}\left\{ d_{n}^{1} \right\}_{n = 0}^{M_{1} - 1}{are}\mspace{14mu}{its}\mspace{14mu}{low}\mspace{14mu}{frequency}}} & (1)\end{matrix}$if N is an even number,if N is an odd number;

-   -   M₁=N−N₁        {C_(n) ¹}_(n=0) ^(N) ¹ ⁻¹ and {d_(n) ¹}_(n=0) ^(M) ¹ ⁻¹ are its        low frequency (l) part and high frequency (h) part,        respectively. For multi-levels, we just create        {c_(n)¹}_(n = 0)^(N₁ − 1)  as  {c_(n)⁰}_(n = 0)^(N₁)        and repeat the procedure again.

EXAMPLE 1 A (2,2)-Wavelet Transform by Integer Calculation

-   -   This transformation is similar to a variation of the Haar        wavelet transform which uses low and high pass analysis        (decomposition) filters given as:

n 0 1 {tilde over (h)}_(n) ½  ½ {tilde over (g)}_(n) ½ −½

-   (1) Compute    d _(k) ¹ =c _(2k) ⁰ −c _(2k+1) ⁰ , k=0, . . . , M ₁−1  (2.1)-   (2) Compute $\begin{matrix}    {{c_{k}^{l} = {{{Int}\left( \frac{d_{k}^{l}}{2} \right)} + c_{{2k} + 1}^{0}}},{k = 0},\ldots\mspace{14mu},{N_{1} - 2},{c_{N_{1} - 1}^{l} = \left\{ \begin{matrix}    {{{{Int}\left( \frac{d_{M_{1} - 1}^{1}}{2} \right)} + C_{{2k} + 1}^{0}},} & {{{if}\mspace{14mu} N\mspace{14mu}{is}{\mspace{11mu}\;}{an}\mspace{14mu}{even}\mspace{14mu}{number}},} \\    {c_{N - 1}^{0},} & {{if}\mspace{14mu} N\mspace{14mu}{is}{\mspace{11mu}\;}{an}\mspace{14mu}{odd}\mspace{14mu}{{number}.}}    \end{matrix} \right.}} & (2.2)    \end{matrix}$

Here, Int(x) is an arbitrary rounding function which may have differentinterpretations. For example, Int(x) can be the integer which is nearestto x, or Int(x) may be any integer which satisfies x−1<Int(x)≦x, etc. Itis easy to see that all entries in both {c_(n) ¹}_(n=0) ^(N) ¹ ⁻¹ and{d_(n) ¹}_(n=0) ^(M) ¹ ⁻¹ are integers.

From (2.1)–(2.2), we can easily get the following integer reconstructionalgorithm:

-   (b) Reconstruction    -   (1) If N is an even number, compute: $\begin{matrix}        {{c_{{2k} + 1}^{0} = {c_{k}^{l} - {{Int}\left( \frac{d_{k}^{l}}{2} \right)}}},{k = 0},\ldots\mspace{14mu},{{N_{1} - 1};}} & (2.3)        \end{matrix}$        or, if N is an odd number, we have $\begin{matrix}        {{c_{{2k} + 1}^{0} = {{c_{k}^{l} - {{{Int}\left( \frac{d_{k}^{l}}{2} \right)}.\mspace{14mu} k}} = 0}},\ldots\mspace{14mu},{{N_{1} - 2};{c_{N - 1}^{0} = {c_{N_{1}}^{l}.}}}} & (2.4)        \end{matrix}$    -   (2) Compute        c _(2k) ⁰ =d _(k) ¹ +c _(2k+1) ⁰ k=0, . . . , M ₁−1.  (2.5)

REMARK. Since (2.1)–(2.5) are not linear because of the roundingoperation Int(x), this means the transformation order becomessignificant. For instance, if the decomposition was applied first to thecolumns and then to the rows, the inverse transformation must be appliedfirst to the rows and then to the columns.

EXAMPLE 2 Lazy Wavelet Transform

The lazy wavelet transform is used to illustrate an important concept.The corresponding inverse transform is nothing else but sub-sampling theeven and odd indexed samples. Decomposition and reconstruction can usethe same formula as follows:c _(k) ¹ =c _(2k) ⁰ , k=0, . . . N ₁−1;d _(k) ¹ =c _(2k+1) ⁰ , k=0, . . . , M ₁−1.

Examples 1 and 2 are not good transforms for image compression, but theyare simple. Much better transforms can be achieved from these two. Assuggested above, they are considered only as a starting point for theinteger, reversible, wavelet transform algorithm of the disclosedinvention.

It is noted that there is another interesting property in the above twotransforms which may not be easily seen. If the values of the signalpixels are represented by a finite number of bits, say one bit or onebyte, the same number of bits can be used to represent the result of theforward transform within the computer itself because of thecomplementary code property. While, from the reconstruction algorithm,the computer will get back the exact original signal through the samecomplementary code property. This property is called a Property ofPrecision Preservation (PPP) for these wavelets.

It is known that the general values for the high frequency waveletcoefficients are small, and all higher levels of the decompositionprovide generally small values in the high frequency band. This allowsthe preservation of precision during the computational stage of thewavelet coefficients. Now, the complementary code property, the otheraspect of the PPP property, is a well know characteristic of the integerarithmetic as done by the computer. Consider the computation of thedifference of two integers given as c=b−a and the inverse computation ofa=b−c. the nature of the computation within the computer can bespecified as follows: $c_{m} = \left\{ \begin{matrix}{b - a} & {{{if}\mspace{11mu} - 2^{q - 1}} \preceq {b - a} < {2^{q - 1} - 1}} \\{{- 2^{q}} + b - a} & {{{{if}\mspace{14mu} b} - a} \succcurlyeq 2^{q - 1}} \\{2^{q} + b - a} & {{{{if}\mspace{14mu} b} - a} < {- 2^{q - 1}}}\end{matrix} \right.$and the inverse is $a_{m} = \left\{ \begin{matrix}{b - c_{m}} & {{{if}\mspace{11mu} - 2^{q - 1}} \preceq {b - a} < {2^{q - 1} - 1}} \\{{- 2^{q}} + b - c_{m}} & {{{{if}\mspace{14mu} b} - c_{m}} \succcurlyeq 2^{q - 1}} \\{2^{q} + b - c_{m}} & {{{{if}\mspace{14mu} b} - c_{m}} < {- 2^{q - 1}}}\end{matrix} \right.$where the m subscript indicates the internal representation, and therange of the integers a, b, c is [−2^(q) ⁻¹ , 2^(q) ⁻¹ −1]. The internalrepresentation of c_(m) when it is outside the range, its appearance isas a two's complement number, so the representation may not be the sameas the external representation of c. However, the same complementarycode for the a_(m) will cause the internal representation to beidentical to the external representation of a. For example, if we letb=2 (00000010) and a =−127 (10000001) then c_(m) has the internal binaryvalue of (10000001) when q=4. With a value of −127 for c_(m) the inversevalue for a_(m) will just be a.

In fact, for Example 2, this property is obviously true. While forExample 1, if the range of the pixel values is within a finite number ofbits, say q, we can only use q bits as the working unit, which means thevalue of transform coefficients will also be within the interval withlength 2^(q), say [−2^(q−1), 2^(q−1)−1]. Due to the nature ofcomputation on a machine, most machines will implement (2.1)–(2.2)automatically as follows (the complementary code property):$\begin{matrix}{d_{k}^{1} = \left\{ \begin{matrix}{{c_{2k}^{0} - c_{{2k} + 1}^{0}},{{{if}\mspace{14mu} - 2^{q - 1}} \leq {c_{2k}^{0} - c_{{2k} + 1}^{0}} < 2^{q - 1}},} \\{{c_{2k}^{0} - c_{{2k} + 1}^{0} - 2^{q}},{{{{if}\mspace{14mu} c_{2k}^{0}} - c_{{2k} + 1}^{0}} \geq 2^{q - 1}},} \\{{2^{q} + \left( {c_{2k}^{0} - c_{{2k} + 1}^{0}} \right)},{{{{if}\mspace{14mu} c_{2k}^{0}} - c_{{2k} + 1}^{0}} < {- {2^{q - 1}.}}}}\end{matrix} \right.} & (2.6)\end{matrix}$ $\begin{matrix}{c_{k}^{1} = \left\{ \begin{matrix}{{{{Int}\left( \frac{d_{k}^{1}}{2} \right)} + c_{{2k} + 1}^{0}},{{{if}\mspace{14mu} - 2^{q - 1}} \leq {{{Int}\left( \frac{d_{k}^{1}}{2} \right)} + c_{{2k} + 1}^{0}} < 2^{q - 1}},} \\{{{{Int}\left( \frac{d_{k}^{1}}{2} \right)} + c_{{2k} + 1}^{0} - 2^{q}},{{{{if}\mspace{14mu}{Int}\left( \frac{d_{k}^{1}}{2} \right)} + c_{{2k} + 1}^{0}} \geq 2^{q - 1}},} \\{{{{Int}\left( \frac{d_{k}^{1}}{2} \right)} + c_{{2k} + 1}^{0} + 2^{q}},{{{{if}\mspace{14mu}{{Int}\left( \frac{d_{k}^{1}}{2} \right)}} + c_{{2k} + 1}^{0}} < {- {2^{q - 1}.}}}}\end{matrix} \right.} & (2.7)\end{matrix}$

While the reconstruction algorithm (2.3) and (2.5) will be implementedby the computer itself as $\begin{matrix}{c_{{2k} + 1}^{0} = \left\{ \begin{matrix}{{c_{k}^{1} - {{Int}\left( \frac{d_{k}^{1}}{2} \right)}},{{{if}\mspace{14mu} - 2^{q - 1}} \leq {c_{k}^{1} - {{Int}\left( \frac{d_{k}^{1}}{2} \right)}} < 2^{q}},} \\{{2^{q} + \left( {c_{k}^{1} - {{Int}\left( \frac{d_{k}^{1}}{2} \right)}} \right)},{{{{if}\mspace{14mu} c_{k}^{1}} - {{Int}\left( \frac{d_{k}^{1}}{2} \right)}} < {- 2^{q - 1}}},} \\{{\left( {c_{k}^{1} - {{Int}\left( \frac{d_{k}^{1}}{2} \right)}} \right) - 2^{q}},{{{{if}\mspace{14mu} c_{k}^{1}} - {{Int}\left( \frac{d_{k}^{1}}{2} \right)}} > {- {2^{q - 1}.}}}}\end{matrix} \right.} & (2.8)\end{matrix}$ $\begin{matrix}{c_{2k}^{0} = \left\{ \begin{matrix}{{d_{k}^{1} + c_{{2k} + 1}^{0}},{{{if}\mspace{14mu} - 2^{q - 1}} \leq {d_{k}^{1} + c_{{2k} + 1}^{0}} < 2^{q - 1}},} \\{{d_{k}^{1} + c_{{2k} + 1}^{0} + 2^{q}},{{{{if}\mspace{14mu} d_{k}^{1}} + c_{{2k} + 1}^{0}} < {- 2^{q - 1}}},} \\{{d_{k}^{1} + c_{{2k} + 1}^{0} - 2^{q}},{{{{if}\mspace{14mu} d_{k}^{1}} + c_{{2k} + 1}^{0}} \geq {- {2^{q - 1}.}}}}\end{matrix} \right.} & (2.9)\end{matrix}$It is obvious that (2.8)–(2.9) are just the reverse of (2.6)–(2.7). Itis also easy to see that if we properly take advantage of the bound inthe coefficient size mentioned above, the algorithm can be implementedusing a minimal amount of storage.

The following are examples which give motivation for our new approach.

EXAMPLE 3 A (2.6) Wavelet Transform by Integer Calculation (2)

This transformation is similar to using the following analysis filters:

n −2 −1 0 1 2 3 {tilde over (h)}_(n) 0 0 ½  ½ 0 0 {tilde over (g)}_(n) −1/16 − 1/16 ½ −½ 1/16 1/16(a) Decomposition

Decomposition starts with Example 1 at step (1) and (2), and thenupgrades the high frequency component at step (3):

(1) Computed _(k) ^(1,0) =c _(2k) ⁰ −c _(2k+1) ⁰ , k=0, . . . , M ₁−1.(2) Compute${c_{k}^{1} = {{{Int}\left( \frac{d_{k}^{1,0}}{2} \right)} + c_{{2k} + 1}^{0}}},{k = 0},\ldots\mspace{11mu},{N_{1} - 2},$$c_{N_{1} - 1}^{1} = \left\{ \begin{matrix}{{{Int}\left( \frac{d_{M_{1} - 1}^{1,0}}{2} \right)},{+ C_{N - 1}^{0}},} & {{{if}\mspace{14mu} N\mspace{14mu}{is}\mspace{14mu}{an}\mspace{14mu}{even}\mspace{14mu}{number}},} \\{c_{N - 1}^{0},} & {{{if}\mspace{14mu} N\mspace{14mu}{is}\mspace{14mu}{an}\mspace{14mu}{old}\mspace{14mu}{number}};}\end{matrix} \right.$(3) Compute $\left\{ {\quad\begin{matrix}{{d_{0}^{1} = {{Int}\left( \frac{c_{0} - c_{1}^{1}}{4} \right)}},{+ d_{0}^{1,0}}} \\{d_{k}^{1},{= {{{Int}\left( \frac{c_{k - 1}^{1} - c_{k + 1}^{1}}{4} \right)} - d_{k}^{1,0}}},{k = 1},\ldots\mspace{11mu},{M_{1} - 2},}\end{matrix}} \right.$and then, if N is even, calculate${d_{M_{1} - 1}^{1} = {{{Int}\left( \frac{c_{N_{1} - 2}^{1} - c_{N_{1} - 1}^{1}}{4} \right)} - d_{M_{1} - 1}^{1,0}}},$else, calculate$d_{M_{1} - 1}^{1} = {{{Int}\left( \frac{c_{N_{1} - 3}^{1} - c_{N_{1} - 1}^{1}}{4} \right)} - {d_{M_{1} - 1}^{1,0}.}}$(b) Reconstruction

The reconstruction algorithm is identical to the decompositionalgorithm, except it is now running “backwards”.(1) Compute $\left\{ {\quad\begin{matrix}{d_{0}^{1,0} = {{{Int}\left( \frac{c_{0}^{1} - c_{1}^{1}}{4} \right)} - d_{0}^{1}}} \\{{d_{k}^{1,0} = {{{Int}\left( \frac{c_{k - 1}^{1} - c_{k + 1}^{1}}{4} \right)} - d_{k}^{1}}},{k = 1},\ldots\mspace{11mu},{M_{1} - 2},}\end{matrix}} \right.$and then, if N is even, calculate${d_{M_{1} - 1}^{1,0} = {{{Int}\left( \frac{c_{N_{1} - 2}^{1} - c_{N_{1} - 1}^{1}}{4} \right)} - d_{M_{1} - 1}^{1,1}}},$else calculate${d_{M_{1} - 1}^{1,0} = {{{Int}\left( \frac{c_{N_{1} - 3}^{1} - c_{N_{1} - 1}^{1}}{4} \right)} - d_{M_{1} - 1}^{1,1}}},$(2) If N is an even number, compute${c_{{2k} + 1}^{0} = {c_{k}^{1} - {{Int}\left( \frac{d_{k}^{1,0}}{2} \right)}}},{k = 0},\ldots\mspace{11mu},{{N_{1} - 1};}$or, if N is an odd number, we have${c_{{2k} + 1}^{0} = {c_{k}^{1} - {{Int}\left( \frac{d_{k}^{1,0}}{2} \right)}}},{k = 0},\ldots\mspace{11mu},{{N_{1} - 2};}$c_(N − 1)⁰ = c_(N₁)¹.(3) Computec _(2k) ⁰ =d _(k) ^(1,0) +c _(2k+1) ⁰ , k=0, . . . , M ₁−1.

We see in step (2)–(3) above, that they are just the same as shown forthe reconstruction of the (2.2)-wavelet transform (Example 1).

EXAMPLE 4 A (1,3)-Wavelet Transform by Integer Calculation

The following nonlinear transform is a variation of the transform whichuses biorthogonal analysis filters:

n −1 0 1 {tilde over (h)}_(n) 1 0 0 {tilde over (g)}_(n) ¼ −½ ¼(a) Decomposition

This decomposition starts with the Lazy wavelet at step (1) and upgradesthe high frequency component at step (2):

(1) Setc _(k) ¹ =c _(2k) ⁰ , k=0, . . . , N ₁−1;d _(k) ¹ =c _(2k+1) ⁰ , k=0, . . . , M ₁−1;(2) If N is an even number, calculate $\left\{ {\quad\begin{matrix}{{d_{k}^{1} = {{{Int}\left( \frac{c_{k -}^{1} - c_{k + 1}^{1}}{2} \right)} - d_{k}^{1,0}}},{k = 0},\ldots\mspace{11mu},{M_{1} - 2},} \\{d_{M_{1} - 1}^{1},{= {c_{N_{1} - 1}^{1} - {d_{M_{1} - 1}^{1,0}.}}}}\end{matrix}} \right.$

Otherwise, if N is an odd number, calculate${d_{k}^{1} = {{{Int}\left( \frac{c_{2k}^{0} + c_{{2k} + 2}^{0}}{2} \right)} - c_{{2k} + 1}}},{k = 0},\ldots\mspace{14mu},{M_{1} - 1.}$(b) Reconstruction

(1) Setc _(2k) ⁰ =c _(k) ¹ , k=0, . . . , N ₁−1;

(2) If N is an even number, calculate $\left\{ {\begin{matrix}{{c_{{2k} + 1}^{0} = {{{Int}\left( \frac{c_{2k}^{0} + c_{{2k} + 2}^{0}}{2} \right)} - d_{k}^{1}}},{k = 0},\ldots\mspace{14mu},{M_{1} - 2},} \\{c_{N - 1}^{0},{= {c_{N - 2}^{0} - {d_{M_{1} - 1}^{1}.}}}}\end{matrix}\quad} \right.$Otherwise, if N is an odd number, calculate${c_{{2k} + 1}^{0} = {{{Int}\left( \frac{c_{2k}^{0} + c_{{2k} + 2}^{0}}{2} \right)} - d_{k}^{1}}},{k = 0},\ldots\mspace{14mu},{M_{1} - 1.}$

EXAMPLE 5 (5,3)-Wavelet Transform by Integer Calculation

This transformation is also similar in function to using thebiorthogonal analysis filters. It is given by

n −2 −1 0 1 2 {tilde over (h)}_(n) −⅛  ¼ ¾ ¼ −⅛ {tilde over (g)}_(n)  ¼−½ ¼ 0 0(a) Decomposition

This decomposition starts with Example 3 at step (1) and upgrade lowfrequency components at step (2):

(1) Setc _(k) ^(1,0) =c _(2k) ⁰ , k=0, . . . , N ₁−1;

If N is an even number, calculate $\left\{ {\begin{matrix}{{d_{k}^{1} = {{{Int}\left( \frac{c_{2k}^{0} + c_{{2k} + 2}^{0}}{2} \right)} - c_{{2k} + 1}^{0}}},{k = 0},\ldots\mspace{14mu},{M_{1} - 2},} \\{d_{M_{1} - 1}^{1} = {c_{N - 2}^{0} - {c_{N - 1}^{1}.}}}\end{matrix}\quad} \right.$

Otherwise, if N is an odd number, calculate${d_{k}^{1} = {{{Int}\left( \frac{c_{2k}^{0} + c_{{2k} + 2}^{0}}{2} \right)} - c_{{2k} + 1}}},{k = 0},\ldots\mspace{14mu},{M_{1} - 1.}$

(2) If N is an even number, compute $\left\{ {\begin{matrix}{{c_{0}^{1} = {c_{0}^{1,0} - {{Int}\left( \frac{d_{0}^{1}}{2} \right)}}},} \\{{c_{k}^{1} = {c_{k}^{1,0} - {{Int}\left( \frac{d_{k - 1}^{1} + d_{k}^{1}}{4} \right)}}},{k = 1},\ldots\mspace{14mu},{N_{1} - 2},} \\{c_{N - 1}^{1} = {c_{N_{1} - 2}^{1,0} - {{{Int}\left( \frac{d_{N_{1} - 2}^{1} + d_{N_{1} - 1}^{1}}{4} \right)}.}}}\end{matrix}\quad} \right.$Otherwise, if N is an odd number, calculate $\left\{ {\begin{matrix}{{c_{0}^{1} = {c_{0}^{1,0} - {{Int}\left( \frac{d_{0}^{1}}{2} \right)}}},} \\{{c_{k}^{1} = {c_{k}^{1,0} - \frac{d_{k - 1}^{1} + d_{k}^{1}}{4}}},{k = 1},\ldots\mspace{14mu},{N_{1} - 2},} \\{c_{N_{1} - 1}^{1} = {c_{N_{1} - 1}^{1,0} - {{{Int}\left( \frac{d_{M_{1} - 1}^{1}}{2} \right)}.}}}\end{matrix}\quad} \right.$(b) Reconstruction

(1) Compute${c_{0}^{0} = {c_{0}^{1} + {{Int}\left( \frac{d_{0}^{1}}{2} \right)}}},{c_{2k}^{0} = {c_{k}^{1} + {{Int}\left( \frac{d_{k - 1}^{1} + d_{k}^{1}}{4} \right)}}},{k = 1},\ldots\mspace{14mu},{N_{1} - 2},$Then, if N is even, calculate$c_{N - 2}^{0} = {c_{N_{1} - 1}^{1} + {{{Int}\left( \frac{d_{N_{1} - 2}^{l} + d_{N_{l} - 1}^{1}}{4} \right)}.}}$else calculate$c_{N - 1}^{0} = {c_{N_{1} - 1}^{1} + {{{Int}\left( \frac{d_{M_{1} - 1}^{1}}{2} \right)}.}}$(2) Compute${c_{{2k} + 1}^{0} = {{{Int}\left( \frac{c_{2k}^{0} + c_{{2k} + 2}^{0}}{2} \right)} - d_{k}^{l}}},{k = 0},\ldots\mspace{14mu},{M_{1} - 2},$Then, if N is even, calculatec _(N−1) ⁰ =c _(N−2) ⁰ −d _(M) ₁ ⁻¹ ¹.

The PPP property for Examples 1–2 mentioned at the end of the previoussection is also applicable for these three examples. It is obvious thesethree transformations are not really linear, but they are similar to theone using the corresponding filters given above. Especially, the filtersin Example 3 and Example 5 belong to, with minor modification, the groupof the best biorthogonal filters for image compression.

Also, from the above three examples, we can note that if we begin withinteger (linear or nonlinear) wavelet transformations and then use someproper upgrading formulas, we can get other, much better integer,wavelet transformations for image compression.

Lifting Scheme and Integer Biorthogonal Filtering

The Lifting scheme, discussed by W. Sweldens in “The Lifting Scheme: ACustom-Designed Construction of Biorthogonal Wavelet”, Applied andComputational Harmonic Analysis, Vol. 3, No. 2, April 1996, is arecently developed approach for constructing biorthogonal wavelets withcompact support. It can be used, with minor modifications, to createinteger biorthogonal wavelet transformations. The following is anadaptation of the lifting scheme.

Definition 1. The set of filters {h, h, g, g}, a set of biorthogonalfilters if the following formula is satisfied:${{\forall{{\omega\varepsilon}\;}}:{{\overset{\sim}{m}(\omega)}{M^{\prime}(\omega)}}} = 1.$${{m(\omega)} = \begin{bmatrix}{h(\omega)} & {h\left( {\omega + \pi} \right)} \\{g(\omega)} & {g\left( {\omega + \pi} \right)}\end{bmatrix}},{{h(\omega)} = {{\sum\limits_{k}{h_{k}{\mathbb{e}}^{{- k}\;\omega}{and}\mspace{14mu}{g(\omega)}}} = {\sum\limits_{k}{g_{k}{\mathbb{e}}^{{- k}\;\omega}}}}},$whereandand similarly for {tilde over (m)}(ω), {tilde over (h)}(ω) and {tildeover (g)}(ω).

The following lemma is the main result of the lifting scheme [1]reported as corollary 6 in that paper.

Lemma 1. Take an initial set of finite biorthogonal filters {h, {tildeover (h)}^(o), g^(o), {tilde over (g)}}, then a new set of finitebiorthogonal filters {h, {tilde over (h)}, g, {tilde over (g)}} can befound as{tilde over (h)}(ω)= {tilde over (h)} ⁰(ω)+{tilde over (g)}(ω){overscore (s(2ω) )}g(ω)=g ⁰(ω)−h(ω)s(2ω).Similarly, if we take {h⁰, {tilde over (h)}, g, {tilde over (g)}⁰} as aninitial set of biorthogonal filters, a new set of biorthogonal filters{h, {tilde over (h)}, g, {tilde over (g)}} can be found ash(ω)=h ⁰(ω)+g(ω){tilde over ({overscore (s)}(2ω){tilde over (g)}(ω)={tilde over (g)} ⁰(ω)−{tilde over (h)}(ω){tilde over(s)}(2ω).Here s(ω) is a trigonometric polynomial and the corresponding filter sis finite, and so is {tilde over (s)}(ω). Actually, regarding thefilters (4.1) is equivalent to${\overset{\sim}{h}}_{k} = {{\overset{\sim}{h}}_{k}^{0} + {\sum\limits_{1}{{\overset{\sim}{g}}_{k + {2l}}{\overset{\sim}{s}}_{l}}}}$$g_{k} = {g_{k}^{0} - {\sum\limits_{1}{h_{k - {2l}}{\overset{\sim}{s}}_{l}}}}$or $\begin{matrix}{{h_{k} = {h_{k}^{0} + {\sum\limits_{i}{g_{k + {2l}}{\overset{\sim}{s}}_{l}}}}}{{\overset{\sim}{g}}_{k} = {{\overset{\sim}{g}}_{k}^{0} - {\sum\limits_{i}{{\overset{\sim}{h}}_{k - {2l}}{\overset{\sim}{s}}_{1}}}}}} & (4.26)\end{matrix}$

Next we use the lifting scheme with minor modifications to create aninteger, nonlinear, quasi-biorthogonal, wavelet algorithm. Suppose[C_(n) ⁰] is a original signal, [C_(n) ¹] and [d_(n) ¹] are again itslow and high frequency decomposition parts, obtained by using thefilters {h, {tilde over (h)}, g, {tilde over (g)}}.

If we use filters {{tilde over (h)}, {tilde over (g)}} for decomposition(analysis), the corresponding decomposition algorithm is$\left\{ {\begin{matrix}{{c_{k}^{1} = {\alpha_{c}{\sum\limits_{n}{c_{n}^{0}{\overset{\sim}{h}}_{n - {2k}}}}}},} \\{d_{k}^{1} = {\alpha_{d}{\sum\limits_{n}{C_{n}^{0}{{\overset{\sim}{g}}_{n - {2k}}.}}}}}\end{matrix}\quad} \right.$While the reconstruction algorithm will be${c_{n}^{0} = {2{\sum\limits_{k}\left( {\frac{c_{k}^{1}h_{n - {2k}}}{\alpha_{c}} + \frac{d_{k}^{1}g_{n - {2k}}}{\alpha_{d}}} \right)}}},$related to the synthesis filter {h, g}. Here, parameters α_(c) and α_(d)are positive constants with α_(c)·α_(d)=2. For example, in the situationof regular biorthogonal decomposition and reconstruction,α_(c)=α_(d)=√{square root over (2)}; and for Example 1 through Example 5above, α_(c)=1 and α_(d)=2.

If the set of filters {h, {tilde over (h)}, g, {tilde over (g)}} is from{h, {tilde over (h)}⁰, g⁰, {tilde over (g)}} by (4.2b), thendecomposition can be accomplished as follows:1. Calculate $\left\{ {\begin{matrix}{{c_{k}^{1,0} = {\alpha_{c}{\sum\limits_{n}{c_{n}^{0}{\overset{\sim}{h}}_{n - {2k}}^{0}}}}},} \\{d_{k}^{1} = {\alpha_{d}{\sum\limits_{n}{c_{n}^{0}{{\overset{\sim}{g}}_{n - {2k}}.}}}}}\end{matrix}\quad} \right.$2. Calculate $\begin{matrix}{c_{k}^{1} = {c_{k}^{1,0} + {\frac{\alpha_{c}}{\alpha_{d}}{\sum\limits_{1}{d_{k - 1}^{1}{s_{1}.}}}}}} & (4.4)\end{matrix}$The relative reconstruction scheme will be:1. Calculate $\begin{matrix}{c_{k}^{1,0} = {c_{k}^{1}\frac{\alpha_{c}}{\alpha_{d}}{\sum\limits_{1}d_{k - 1^{s_{1}}}^{1}}}} & (4.5)\end{matrix}$2. Calculate $\begin{matrix}{c_{n}^{0} = {2{\sum\limits_{k}{\left( {\frac{c_{k}^{1,0}h_{n - {2k}}}{\alpha_{c}} + \frac{d_{k}^{1}g_{n - {2k}}^{0}}{\alpha_{d}}} \right).}}}} & (4.6)\end{matrix}$Here, equations (4.3) and (4.6) are just the wavelet (inverse)transforms using biorthogonal filters {h, {tilde over (h)}^(o), g^(o),{tilde over (g)}}. While (4.4) and (4.5) are forward and backwardupgrading formulas.

Similarly if the set of filters {h, {tilde over (h)}, g, {tilde over(g)}} is from the initial set of filters {h^(o), {tilde over (h)}, g,{tilde over (g)}^(o)} by using (4.2b), the relative decomposition is:1. Calculate $\left\{ {\begin{matrix}{c_{k}^{1} = {\alpha_{c}{\sum\limits_{n}{c_{n}^{0}h_{n - {2k}}}}}} \\{d_{k}^{1,0} = {\alpha_{d}{\sum\limits_{n}{c_{n}^{0}{{\overset{\_}{g}}_{n - {2k}}^{0}.}}}}}\end{matrix}\quad} \right.$2. Calculate$d_{k}^{1} = {d_{k}^{1,0}\frac{\alpha_{c}}{\alpha_{d}}{\sum\limits_{1}c_{k - 1^{s_{1}}}^{1}}}$The reconstruction scheme is:

-   -   1. Calculate    -   1. Calculate        $d_{k}^{1,0} = {d_{k}^{1}\frac{\alpha_{c}}{\alpha_{d}}{\sum\limits_{1}c_{k - 1^{s_{1}}}^{1}}}$    -   2. Calculate        $c_{n}^{0} = {2{\sum\limits_{k}{\left( {\frac{c_{k}^{1,0}h_{n - {2k}}}{\alpha_{c}} + \frac{d_{k}^{1}g_{n - {2k}}^{0}}{\alpha_{d}}} \right).}}}$        Corollary 4.1. Suppose biorthoganal filters {h, {tilde over        (h)}, g, {tilde over (g)}} are from initial filters {h, {tilde        over (h)}⁰, g⁰, {tilde over (g)}} by the lifting scheme (4.1a)        or (4.2a). If the decomposition and reconstruction by filters        {h, {tilde over (h)}⁰, g⁰, {tilde over (g)}} can be accomplished        only by integer calculation, such as Example 2, we also can        create a corresponding integer wavelet decomposition and        reconstruction scheme which is very “close” to the original one        by using filters {h, {tilde over (h)}, g, {tilde over (g)}}.        Here the word “close” means that the difference of the two        decompostion schemes is just some rounding error, and this        rounding error will be corrected by the integer reconstruction        scheme.

In fact, if {c_(k) ^(1,0)} and {d_(k) ¹} are integer after (4.3), we cancalculate {c_(k) ¹} by$c_{k}^{1} = {c_{k}^{1,0} + {{Int}\left( {\frac{\alpha_{c}}{\alpha_{d}}{\sum{d_{k - 1}s_{1}}}} \right)}}$instead of (4.4). Here Int(x), as described in Section 2, is anarbitrary rounding up function which satisfies x−1≦Int(x)≦x+1. It isobvious that (4.7) is very close to (4.4), and the exact reconstructionscheme can easily be obtained from$c_{k}^{1,0} = {c_{k}^{1} - {{Int}\left( {\frac{\alpha_{c}}{\alpha_{d}}{\sum\limits_{1}d_{k - 1^{s_{1}^{1}}}}} \right)}}$and (4.6). There will be a similar result, if the set of biorthogonalfilters {h, {tilde over (h)}, g, {tilde over (g)}} is obtained from theinitial set of filters {h^(o), {tilde over (h)}, g, {tilde over(g)}^(o)} by using (4.2b).

Except for the example shown in the Lazy wavelet (Example 2), moststandard biorthogonal wavelet forms cannot be performed directly byinteger, even for one of the simplest wavelets, the Harr wavelet.However, if the parameters α_(c), and α_(d) are properly chosen and thetransform algorithms, such as Example 1 and Example 3, are slightlychanged, a variation of the original biorthogonal wavelet transformswith respect to the set of filters {h, h, g, g} is created. On the otherhand, the parameters should be also chosen carefully to guarantee thatonly addition and shift operations are needed by the algorithm.

If the set of filters {h, {tilde over (h)}, g, {tilde over (g)}} isobtained from a set of filters {h^(o), {tilde over (h)}, g, {tilde over(g)}^(o)} by the lifting scheme, and the set {h^(o), {tilde over (h)},g, {tilde over (g)}^(o)} is also obtained from a filter set {h^(o),{tilde over (h)}^(o), g^(o), {tilde over (g)}^(o)}, one can repeatedlyuse Corollary 1 to get a “close” integer wavelet transformation.

The Correction Method for Creating Integer Wavelet Transforms

Another approach for obtaining integer wavelets is using the so-calledCorrection method. The motivation of this method is from the S+Ptransform. The lifting scheme for generating biorthogonal wavelets canbe considered as a special case of the correction method. From this canbe derived complicated filters with fast decomposition andreconstruction algorithms.

Assuming a simple integer wavelet transform, such as Examples 1 through3, the decomposition and reconstruction scheme of which can beformulated as follows:

Decompositionc ₁ ^(1,0) =df _(c)({c _(n) ^(o)})d ₁ ^(1,0) =df _(d)({c _(n) ^(o)})  (5.1)

Reconstructionc _(n) ⁰ =rf({c ₁ ^(1.0) },{d _(k) ^(1.0)})  (5.2)Here, (5.1) and (5.2) can be the same as (4.3) and (4.6) or otheralgorithms.

In general, after the above decomposition, one may not be satisfied withthe result. There may still be some correlation among the high passcomponents because of the aliasing from the low pass components, or thelow pass components do not carry enough of the expected information fromthe original signal. Hence, one could make an improvement by puttingsome correction part on the high pass components or low pass components.There are many ways to accomplish this. However, for the sake of theinteger calculation, it is preferable to use following correctionmethod. To make a correction for the high pass part, the correspondingformula would be:d ₂ ¹ =d _(k) ^(1,0) −Int(dc _(2,k) ¹)k= . . . , 0, 1, 2 . . .  (5.3)Here, dc_(k) ^(l) is a correction quantity for d_(k) ¹ $\begin{matrix}{{d_{k}^{1} = {{\sum\limits_{j = 1}^{s_{1}}{\sigma_{i}c_{k + 1}^{1,0}}} + {\sum\limits_{j = 1}^{1}{\tau_{j}d_{k + j}^{1,0}}}}},{k = \ldots}\mspace{11mu},0,1,2,\ldots} & (5.4)\end{matrix}$and {σ_(i)}_(j=so) ^(S) ^(R) and {τ_(j)}_(j2) ^(T), are given parameterswhich have been chosen for the user's purpose such as reducing theredundancy among high pass components or some other special requirement.To preserve the integer calculation, any entries in both {σ_(i)}_(i=So)^(S) ^(l) and {τ_(j)}_(j=1) ^(T) should be rational numbers withdenominators being powers of 2.

From (5.1), (5.3) and (5.4), it is easy to see the perfectreconstruction algorithm can bed _(k) ^(1,0) =d _(k) ¹ +Int(dc _(k)), k= . . . , m, m−1, m−2 . . .,  (5.5)combined with (5.2).

As mentioned above, the Lifting scheme is a special condition of thecorrection method. Examples 3 through 5 can also be considered as theexamples of this method. We next give an example of the Correctionmethod which cannot be included in the group of Lifting scheme, and alsowhich does not result in a closed form of compact support forbiorthogonal filters.

EXAMPLE 6 S+P Transform, which is Similar to Using Following AnalysisFilters

n −2 −1 0 1 2 3 {tilde over (h)}_(n) 0 0 ½  ½ 0 0 {tilde over (g)}_(n) −1/16 − 1/16 15/32 − 17/32 7/32 − 1/32

While the synthesis filters do not have compact support, the S+Ptransform can be implemented as follows:

(a) Decomposition

(1) Take the decomposition step of Example 1, that is, computed _(k) ^(1,0) =c _(2k) ⁰ −c _(2k+1) ⁰ , k=−0, 1, . . . , M ₁−1;and${c_{k}^{1} = {{{Int}\left( \frac{d_{k}^{1,0}}{2} \right)} + c_{{2k} + 1}^{0}}},{k = 0},\ldots\mspace{11mu},{N_{1} - 2},$$c_{n_{1} - 1}^{1} = \left\{ {{{{Int}\left( \frac{d_{M_{1} - 1}^{1,0}}{2} \right)} + c_{N - 1}^{0}},c_{n - 1}^{0}} \right.$(2) Correction Step: Define S₀=−1, S₁=1, T=1 and${\sigma_{- 1} = {- \frac{1}{4}}},{{\sigma_{0}--}\frac{1}{6}},{{\sigma_{1} = \frac{1}{6}};{\tau_{1} = {\frac{1}{4}.}}}$and now compute${d_{0}^{1} = {d_{0}^{1,0} - {{Int}\left( \frac{c_{0}^{1} - c_{1}^{1}}{4} \right)}}};$${d_{k}^{1} = {d_{k}^{1,0} - {{Int}\left( \frac{{2c_{k - 1}^{1}} + c_{k}^{1} - {3c_{k + 1}^{1}} - {2d_{k + 1}^{1,0}}}{8} \right)}}},{k = 1},\ldots\mspace{11mu},{{M_{1} - 2};}$$d_{M_{1} - 1}^{1} = {d_{M_{1} - 1}^{1,0} - {{{Int}\left( \frac{C_{M_{1} - 2}^{1} - C_{M_{1} - 1}^{1}}{4} \right)}.}}$(b) Reconstruction

(1) Compute$d_{M_{1} - 1}^{1,0} = {d_{M_{1} - 1}^{1} + {{Int}\left( \frac{C_{M_{1} - 2}^{1} - C_{M_{1} - 1}^{1}}{4} \right)}}$${d_{k}^{1,0} = {d_{k}^{1} + {{Int}\left( \frac{{2c_{k - 1}^{1}} + c_{k}^{1} - c_{K + 1}^{1} - {2d_{k + 1}^{1,0}}}{8} \right)}}},{k = {M_{1} - 2}},\ldots\mspace{11mu},{1;}$$d_{0}^{1,0} = {d_{0}^{1} + {{{Int}\left( \frac{c_{0}^{1} - c_{1}^{1}}{4} \right)}.}}$

(2) If N is an even number, compute${c_{{2K} + 1}^{0} = {c_{k}^{1} - {{Int}\left( \frac{d_{k}^{1}}{2} \right)}}},{k = 0},\ldots\mspace{11mu},{N_{1} - 1}$

or, if N is an odd number, we have${c_{{2k} + 1}^{0} = {c_{k}^{1} - {{Int}\left( \frac{d_{k}^{1}}{2} \right)}}},{k = 0},\ldots\mspace{11mu},{N_{1} - 2},{c_{N - 1}^{0} = {c_{N_{1}}^{1}.}}$

(3) Computec _(2k) ⁰ =d _(k) ¹ +c _(2k+1) ⁰ , k=0, . . . M ₁−1.

Boundary Conditions

There are two issues dealing with boundary filtering if the Liftingscheme or the Correction method is used to generate the integer wavelettransformations. The first is how to process the boundaries which occurin the start-up wavelet transformations. The second is how to deal withthe boundaries in the deductive formula. If the boundaries in thestart-up wavelet transform have already been established, then those inthe upgrading formula are relatively easy to establish. For the Liftingscheme, the boundaries in both steps should be processed in the sameway. While, for the Correction method, according to (5.3)–(5.4), one hasmore choices to process boundaries in the second step. Therefore, theprocess by which the boundaries in the start-up wavelet transformationsare established is discussed. Assume compact supported biorthogonalwavelets.

Suppose the original signal is {C_(n) ^(o)}_(n=o) ^(N). For creatinginteger biorthogonal wavelet transformations, use the followingsymmetric extension:

-   -   (1) If current biorthogonal filters have even length, the        boundaries of the signal are extended as C_(−k) ^(o)=C_(k−1)        ^(o), k=1, 2, . . . ;    -   (2) If the filters have odd length, the following extension is        performed        C _(−k) ^(o) =C _(k) ^(o) , k=1, 2, . . . .

Examples 1 through 5 use the boundaries given above. In Example 6, thestart up wavelet transform uses the above boundaries but in theupgrading step, another boundary filtering is used. In addition, forarbitrarily sized images or signals, one can use the same techniquedescribed in the above examples to deal with this condition.

As mentioned earlier, for many applications, lossless image compressionis more important than lossy compression. The integer wavelet transformsdescribed above provide the opportunity to compress without loss. It isalso obvious that the integer wavelet algorithms can be used whereverordinary wavelets are used, especially in signal and image compression.However, for most computers, the integer wavelet transform is muchfaster than other wavelets and it uses much less memory.

Peak Signal to Noise Ratio (PSNR) Controlled Compression

Peak Signal to Noise Ratio (PSNR) is a widely used quality measurement.PSNR controlled compression allows users to choose their desired PSNRfor the compressed image. In each of the compression methods set forthherein, a user can selectively set the PSNR and the desired compressionratio, as well as the initial quantization and threshold levels for eachquadrant of wavelet coefficients, to obtain the desired image quality.

For example, the wavelet map of FIG. 3 shows a total of 10 regions(quadrants). Each of these ten quadrants can have two additionalparameters associated with them. The parameters define the quantizationand threshold values for that particular quadrant. Since there are threeplanes for color (only one for gray level) the maximum number ofparameters that the user can control is 60—10 for quantization and 10for thresholding for each of the three color layers. In the case of agray level image, there are only 20 parameters.

If a compression ratio, or a quality factor which indirectly defines acompression ratio, is specified, then the user wants the compressionratio to remain identical over the changes in the parameters. In orderto accomplish this, two parameters are monitored: the compression ratioand PSNR (peak signal to noise ratio). The PSNR is defined as PSNR=20log₁₀ (X/MSE), where the X is the average absolute value of the pixelsin the compressed image and MSE is the mean squared error measuredbetween the compressed and original image. Holding the compression ratioconstant, the PSNR needs to increase to improve image quality. The wayto increase the PSNR is to reduce the MSE.

An iterative method can be used to adjust parameters to achieve thedesired PSNR. The step are as follows:

-   -   (a) Pick an initial parameter setting P₀;    -   (b) Quantize the wavelet coefficients with P₀ and calculate the        corresponding PSNR;    -   (c) If the PSNR is close to the desired one, stop and output the        coded file; otherwise, get an adjusted vector ΔP₀ and set P₀        P₀+ΔP₀, go to step (b).

Progressive Decomposition

Progressive decompression allows users to decode images at varyingdegrees of resolution, starting from the lowest resolution andprogressing to the highest resolution. The advantage of this feature isthat users can download small pieces of the coded file and view theimage at lower resolution to determine if they want to download thewhole image. Progressive decomposition can be used with any of thedecompression methods previously disclosed herein. Progressivedecomposition is accomplished according to the following steps:

-   -   (a) Input the lowest bandpass component C¹ of the coded file and        reconstruct the lowest resolution image I⁰;    -   (b) Display image I⁰;    -   (c) If the user is not satisfied with the image quality or the        resolution is big enough for stop; otherwise, go to step (d);    -   (d) Input the lowest three band-pass components HD¹, VD¹, and        DD¹ successively in the current image file. Reconstruct the new        image I¹ from C¹, HD¹, VD¹, and DD¹. Let I⁰=I¹; go to step (b).

Image Map Editor

The image map editor creates an image map over a compressed image file.This permits an image compressed according to one of the methods setforth herein to be easily integrated into a web page using an http link.A user selects one or several areas of compressed image, assigns one ormore http links to the areas. The image map editor calculates thecoordinates of the areas and outputs the HTML associate with the image.The user can add such information into program source code. Following isan example of such image map:

-   -   <EMBED SRC=“cow.cod”type=“image/cis-cod”    -   WIDTH=“257” poly=“44, 45, 103, 78, 103, 86, 54, 86, 54, 78”,    -   href=“[user assigned http link]”></EMBED>

Non-Uniform Image Compression

The present invention allows a user to perform non-uniform imagecompression. Essentially, non-uniform compression is accomplished bydividing an image into one or more rectangles, each representing amatrix of image pixels. Each rectangle can be compressed by any of themethods disclosed herein.

For instance, referring to the compression method of FIG. 8, integratingthe non-uniform compression feature with the method allows a user topartition the image into several parts with different interests. Theuser can then compress these areas with different image and/orcompression qualities. The parts can have any shape.

The non-uniform compression feature can be incorporated in to the methodof FIG. 8 as follows. Steps 100–102 are performed. Then, the usercreates bitmap matrices defining the partitioned areas. Each area isthen wavelet transformed. Different quantizations are then applied tothe different areas according to the transformed matrices obtainedabove.

Split and Merge Wavelet Algorithm for Big Image Compression

This algorithm allows users to compress large images by partitioningthem into smaller pieces. The key is to divide the original image intoseveral smaller pieces and compress/decompress them separately by usingoverlap and de-overlap technique. With this technique, the individuallycompressed pieces are equivalent to compressed whole image. The userdoes not see any edge effects in the decompressed image, which normallyoccur with conventional split and merge methods.

Also, with this algorithm, users can selectively decompress the wholeimage or choose a specific part to decompress according to an image mapcreated during the compression phase. The algorithm is preferablyimplemented as a software program executing on a general purposecomputer.

There are two ways to compress an image by splitting it: automaticallyor interactively. The automatic approach is transparent to users sincethe algorithm will automatically split to the image according to thecharacteristics of the computer used to perform the compression. Usingthe automated method, the algorithm first detects the size of the sourceimage and the memory size of the host computer. Next, the image is splitinto several pieces with a predetermined number of pixels overlappingaccording to the image size and computer's memory. Overlapping pixelsare those that appear in more than one piece of the split image.

Each piece of image is compressed in order according to any of themethods disclosed herein from the image resource.

The split image is decompressed as follows. First, the headers of thecompressed image pieces are read to determine their order andcompression parameters, such as quantization thresholds anddecomposition levels. Next, each piece of the image is decompressed andde-overlapped. Merge all pieces together in the proper place fordisplay.

Using the interactive method, a user can indicate how many blocks theywant to divide the image into and how many pixels they want for overlap.To compress an image according to this approach, the size of the sourceimage is first detected. Then, the user's choice for the number ofblocks and number of overlapping pixels is entered. Next, the image isdivided into the pieces according to the user's choice and the size ofthe image. Finally, the individual pieces are compressed according toone of the methods disclosed herein.

The interactively split image is decompressed as follows. First, theheader of the coded image is read. Next, an image map is displayed forthe user to look at what the image context is about. The user can thenchoose to display entire image or a specific piece of image. If userchooses to display a single piece of image, the algorithm finds theposition of this coded piece and decompresses it. If the user insteadchooses to display the entire image, the algorithm decompress each pieceof image and de-overlaps it. All pieces are then merged together in theappropriate display location.

Example A, below, shows further technical details related to the presentinvention.

Attached in Appendix A is a listing of a computer that is related to thepresent invention.

While specific embodiments of the present invention have been shown anddescribed, it will be apparent to this skilled in the art that thedisclosed invention may be modified in numerous ways and may assume manyembodiments other than the preferred form specifically set out anddescribed above. Accordingly, it is intended by the appended claims tocover all modifications of the invention which fall within the truespirit and scope of the invention.

1. An image compression system, comprising: an image source providing animage, the image having a plurality of pixels, each of the pixels havinga finite number of bits; a compressor coupled to the image source, thecompressor configured to generate a compressed image based on an integerwavelet transform derived using a technique selected from a liftingscheme and a correction method, wherein the integer wavelet transformused modular arithmetic and wavelet coefficients of the integer wavelettransform have a finite number of bits that are no greater in numberthan the highest count for the number of bits for any of the pixels ofthe image.
 2. The image compression of claim 1, wherein the compressorquantizes a wavelet transformed image to produce the compressed image.3. The image compression system of claim 1, wherein the compressorentropy encodes a quantized image to produce the compressed image. 4.The compression system of claim 1, wherein the compressor performs acolor transformation to produce the compressed image.
 5. An imagedecompression system, comprising: a compressed image source providing acompressed image; a decompressor coupled to the compressed image source,the decompressor configured to generate a decompressed image based on aninteger wavelet transform derived using a technique selected from alifting scheme and a correction method, wherein the integer wavelettransform used modular arithmetic and wavelet coefficients of theinteger wavelet transform have a finite number of bits that are nogreater in number than a finite number of bits for any of the pixels ofthe decompressed image.
 6. A computer-readable memory storing a computerprogram for directing a computer system to perform image compression,wherein the computer program implements the steps for performing integerwavelet transformation of an input image having a finite number of bitsper pixel, quantizing the wavelet transformed image, applying entropycoding to the quantized image, and outputting a file that includes theentropy coded image, wherein the integer wavelet transform used modulararithmetic and wavelet coefficients of the wavelet transformed imagehave no more finite number of bits than do any of the pixels of theinput image.